<template>
  <div class="account-register">
    <contentBox>
      <el-row justify="center">
        <el-col :span="8">
          <div class="no-auth-content">
            <img src="@/assets/images/authing_error.png" />
            <div class="no-auth-detail">您的合作伙伴认证已被驳回</div>
            <div class="no-pass-reason">驳回原因：{{ pageResult.reason }}</div>
            <div class="no-pass-remark">驳回备注：{{ pageResult.remark }}</div>
            <ElButton
              type="primary"
              size="large"
              class="button"
              @click="updateMessage"
              >更新认证信息</ElButton
            >
          </div>
        </el-col>
      </el-row>
    </contentBox>
  </div>
</template>

<script lang="ts" setup>
const appStore = MyStore.useApp();
const { loginUser } = storeToRefs(appStore);
import contentBox from "../content-box.vue";
import { ElMessage } from "element-plus";
import { getAuthResult } from "@/service/dp.ts";
const emit: any = defineEmits(["updateResource"]);
const pageResult: any = ref({});
function updateMessage() {
  emit("updateResource", true);
}
async function getAuthResultMessage() {
  try {
    const result: any = await getAuthResult({ id: loginUser.value.orgId });
    if (result.code == 200) {
      pageResult.value = result.data;
    } else {
      ElMessage.error(result.msg);
    }
  } catch (e) {}
}
onMounted(() => {
  getAuthResultMessage();
});
</script>

<style scoped>
.account-register {
  overflow: hidden;
}
.no-auth-content {
  padding-top: 240px;
  text-align: center;
}
.right-top-flag {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  width: 220px;
  height: 46px;
  line-height: 46px;
  background: rgba(232, 49, 49, 0.1);
  border-radius: 0px 0px 0px 16px;
  font-family: PingFang SC, PingFang SC;
  font-weight: 400;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.9);
  font-style: normal;
  text-transform: none;
}
.no-auth-detail {
  margin-top: 40px;
  margin-bottom: 16px;
  font-family: PingFang SC, PingFang SC;
  font-weight: 600;
  font-size: 36px;
  color: rgba(0, 0, 0, 0.9);
  line-height: 44px;
  text-align: center;
  font-style: normal;
  text-transform: none;
}
.no-pass-reason,
.no-pass-remark {
  font-family: PingFang SC, PingFang SC;
  font-weight: 400;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.9);
  line-height: 19px;
  text-align: center;
  font-style: normal;
  text-transform: none;
}
.no-pass-remark {
  margin-top: 8px;
  margin-bottom: 40px;
}
</style>
